package com.xszx.knowledge.service.impl;

import com.xszx.knowledge.websocket.WebSocketServer;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class WebSocketServiceImpl {
    @Resource
    private WebSocketServer webSocketServer;

    public void sendMessage(String msg){
        webSocketServer.sendInfo(msg);//websocket向客户端发送消息-消息的内容为msg
    }
}
